<template>
    <div class="header">
        <slot name="left"></slot>
        <div class="header_title">{{title}}</div>
        <slot name="right"></slot>

    </div>
</template>

<script>
    export default {
        name: "HeaderTop",
        props:{
            title:String
        }
    }
</script>

<style lang="stylus" scoped>
    @import '../../assets/mixin.styl'
.header
    position:fixed
    top:0
    left:0
    width:100%
    height:1rem
    z-index:100
    color:#fff
    background:green
    .header_title
        position:absolute
        left: 50%
        top: 50%
        height:1rem
        line-height:1rem
        transform:translate(-50%,-50%)
        text-align:center
        font-size:0.4rem
        max-width:200px
        ellipsis()

</style>
